package com.pattern.visitor;

/**
 * @author 冯志立
 * @create 2019-11-27 10:38
 */
public class Client {
    public static void main(String[] args) {
        //创建objectstructure
        ObjectStructure objectStructure = new ObjectStructure();

        objectStructure.attach(new Man());
        objectStructure.attach(new Woman());

        //成功
        Success success = new Success();
        objectStructure.display(success);

        System.out.println("==================");
        Fail fail = new Fail();
        objectStructure.display(fail);

        System.out.println("===============");
        Wait wait = new Wait();
        objectStructure.display(wait);
    }
}
